package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmSePuYiMapper;
import com.ruoyi.web.tdm.domain.TdmSePuYi;
import com.ruoyi.web.tdm.service.ITdmSePuYiService;

/**
 * 色谱仪Service业务层处理
 * 
 * @author ly
 * @date 2022-03-14
 */
@Service
public class TdmSePuYiServiceImpl implements ITdmSePuYiService 
{
    @Autowired
    private TdmSePuYiMapper tdmSePuYiMapper;

    /**
     * 查询色谱仪
     * 
     * @param id 色谱仪主键
     * @return 色谱仪
     */
    @Override
    public TdmSePuYi selectTdmSePuYiById(Long id)
    {
        return tdmSePuYiMapper.selectTdmSePuYiById(id);
    }

    /**
     * 查询色谱仪列表
     * 
     * @param tdmSePuYi 色谱仪
     * @return 色谱仪
     */
    @Override
    public List<TdmSePuYi> selectTdmSePuYiList(TdmSePuYi tdmSePuYi)
    {
        return tdmSePuYiMapper.selectTdmSePuYiList(tdmSePuYi);
    }

    /**
     * 新增色谱仪
     * 
     * @param tdmSePuYi 色谱仪
     * @return 结果
     */
    @Override
    public int insertTdmSePuYi(TdmSePuYi tdmSePuYi)
    {
        tdmSePuYi.setCreateTime(DateUtils.getNowDate());
        return tdmSePuYiMapper.insertTdmSePuYi(tdmSePuYi);
    }

    /**
     * 修改色谱仪
     * 
     * @param tdmSePuYi 色谱仪
     * @return 结果
     */
    @Override
    public int updateTdmSePuYi(TdmSePuYi tdmSePuYi)
    {
        tdmSePuYi.setUpdateTime(DateUtils.getNowDate());
        return tdmSePuYiMapper.updateTdmSePuYi(tdmSePuYi);
    }

    /**
     * 批量删除色谱仪
     * 
     * @param ids 需要删除的色谱仪主键
     * @return 结果
     */
    @Override
    public int deleteTdmSePuYiByIds(Long[] ids)
    {
        return tdmSePuYiMapper.deleteTdmSePuYiByIds(ids);
    }

    /**
     * 删除色谱仪信息
     * 
     * @param id 色谱仪主键
     * @return 结果
     */
    @Override
    public int deleteTdmSePuYiById(Long id)
    {
        return tdmSePuYiMapper.deleteTdmSePuYiById(id);
    }
}
